﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OnlineMealOrdering.Models;
using OnlineMealOrdering.Persistence;

namespace OnlineMealOrdering.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index(int pagindex = 1, int pagsize = 10)
        {
            using (var ctx = new OnlineStoreDomainContext())
            {
                var data = StoreOnlineModel.GetAllStoreOnline(pagindex, pagsize);
                ViewBag.Catelog = FoodCatalogModel.GetAllCatalogs();
                return View(data);
            }
        }

    }
}
